// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
// import http from './http/http.js'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import VueAxios from 'vue-axios'
import VueCookies from 'vue-cookies'
// import config from './config.js'
// import  VueJsonp  from  'vue-jsonp'
import qs from 'qs'
import xss from 'xss'

import { Toast  } from 'vant';
// import Vant from 'vant';
// import 'vant/lib/index.css';

Vue.config.productionTip = false
ElementUI.Dialog.props.closeOnClickModal.default = false// 全局配置dialog点击空白关闭为false
Vue.use(ElementUI);
Vue.use(VueAxios, axios);
Vue.use(VueCookies);
// Vue.use(qs);
// Vue.use(VueJsonp)
// Vue.use(Vant);
Vue.use(Toast);

Vue.prototype.$qs = qs;
Vue.prototype.$xss = xss;
// Vue.prototype.$config = config;
// Vue.prototype.$http = http
// Vue.prototype.baseUrl = 'http://47.106.178.49:8456/api';

// axios全局配置
// axios.defaults.baseURL = config.baseUrl;
// axios.defaults.baseURL = 'http://47.106.178.49:8456/api';
axios.defaults.headers.post['Content-Type'] ='application/x-www-form-urlencoded';
// axios.defaults.withCredentials = true
// Vue.http.options.credentials = true
Vue.config.productionTip = false
window.$cookies.config(60 * 60 * 24, '');// cookies过期时间
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
